module.exports = {
  /**
   * Application configuration section
   * http://pm2.keymetrics.io/docs/usage/application-declaration/
   */
  apps: [
    {
      name: 'JQ_customer_socket-logger-master',
      script: './logger-master.js',
      instance: 'max',
      env_production: {
        NODE_ENV: 'production',
      },
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
    },
    {
      name: 'JQ_customer_socket',
      script: './',
      env: {
        PORT: 5000,
        MODE: 'socket',
      },
      instances: 'max',
      exec_mode: 'cluster',
      env_production: {
        NODE_ENV: 'production',
      },
      cron_restart: '0 4 * * *',
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
    },
    {
      name: 'JQ_customer_monitor',
      script: './monit-entry.js',
      env: {
        PORT: 5090,
      },
      env_production: {
        NODE_ENV: 'production',
      },
      cron_restart: '0 4 * * *',
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
    },
    {
      name: 'JQ_customer_http',
      script: './',
      env: {
        PORT: 5080,
        MODE: 'http',
      },
      env_production: {
        NODE_ENV: 'production',
      },
      instances: 'max',
      exec_mode: 'cluster',
      cron_restart: '0 4 * * *',
      max_memory_restart: '1G',
      log_date_format: 'YYYY-MM-DD HH:mm:ss',
    },
  ],
};
